xen/pci: replace call to is_memory_hole to pci_check_bar
authorRahul Singh <rahul.singh@arm.com>
Fri, 9 Sep 2022 09:34:40 +0000 (10:34 +0100)
committerStefano Stabellini <stefano.stabellini@amd.com>
Fri, 9 Sep 2022 20:48:25 +0000 (13:48 -0700)
commitcc80e2bab0d09b50397811d5441a8cda071f4e46
tree235c4e6a08e5ceb3c23287cb9b38b484b6b7db00
parent943941fb7a5f968cb48c2b7a8c00f53ad6728575
xen/pci: replace call to is_memory_hole to pci_check_bar

is_memory_hole was implemented for x86 and not for ARM when introduced.
Replace is_memory_hole call to pci_check_bar as function should check
if device BAR is in defined memory range. Also, add an implementation
for ARM which is required for PCI passthrough.

On x86, pci_check_bar will call is_memory_hole which will check if BAR
is not overlapping with any memory region defined in the memory map.

On ARM, pci_check_bar will go through the host bridge ranges and check
if the BAR is in the range of defined ranges.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/include/asm/pci.h
xen/arch/arm/pci/pci-host-common.c
xen/arch/x86/include/asm/pci.h
xen/drivers/passthrough/pci.c